home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / fsattach / RCS / fsattach.man,v < prev    next >
Encoding:
Text File  |  1991-01-13  |  12.5 KB  |  407 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.5
  10. date     91.01.12.16.49.27;  author jhh;  state Exp;
  11. branches ;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     90.02.16.17.54.35;  author brent;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     90.02.14.14.00.01;  author jhh;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     89.06.07.22.14.37;  author jhh;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     89.04.10.11.13.13;  author jhh;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34.  
  35. desc
  36. @@
  37.  
  38.  
  39. 1.5
  40. log
  41. @new boot sequence
  42. @
  43. text
  44. @'\" Copyright 1989 Regents of the University of California
  45. '\" Permission to use, copy, modify, and distribute this
  46. '\" documentation for any purpose and without fee is hereby
  47. '\" granted, provided that this notice appears in all copies.
  48. '\" The University of California makes no representations about
  49. '\" the suitability of this material for any purpose.  It is
  50. '\" provided "as is" without express or implied warranty.
  51. '\" 
  52. '\" $Header: /sprite/src/admin/fsattach/RCS/fsattach.man,v 1.4 90/02/16 17:54:35 brent Exp $ SPRITE (Berkeley)
  53. '/" 
  54. .so \*(]ltmac.sprite
  55. .HS FSATTACH cmds
  56. .BS
  57. '\" Note:  do not modify the .SH NAME line immediately below!
  58. .SH NAME
  59. fsattach \- Check disks and export prefixes 
  60. .SH SYNOPSIS
  61. \fBfsattach\fR [\fIoptions\fR]
  62. .SH OPTIONS
  63. .IP "\fB\-m \fIfile\fR" 15
  64. Read mount table from \fIfile\fR.
  65. .IP "\fB\-W\fR" 15
  66. Check disks, but do not write changes.
  67. .IP "\fB\-f\fR" 15
  68. Don't check disks (fastboot).
  69. .IP "\fB\-s\fR" 15
  70. Ignore group information found in mount table and run \fBfscheck\fR 
  71. sequentially.
  72. .IP "\fB\-v\fR" 15
  73. Have both \fBfsattach\fR and \fBfscheck\fR  output verbose information
  74. while running.
  75. .IP "\fB\-n\fR" 15
  76. Don't attach disks or export prefixes.
  77. .IP "\fB\-p\fR" 15
  78. Print out actions but don't execute them.
  79. .IP "\fB\-help\fR" 15
  80. Print a summary of the command-line options and exit.
  81. .IP "\fB\-d \fIdeviceDirectory\fR" 15
  82. Specifies the directory containing the device files.
  83. The default is "/dev".
  84. .IP "\fB\-k\fR" 15
  85. Produce debugging output.
  86. .IP "\fB\-i \fIspriteID\fR" 15
  87. Causes prefixes that this machine will export to be preloaded into the
  88. prefix table. 
  89. This prevents the machine from broadcasting for its own prefixes while
  90. the disks are being checked.
  91. .IP "\fB\-j \fImaxJobs\fR" 15
  92. The default behavior is for \fBfsattach\fR to run as many \fBfscheck\fR
  93. jobs in parallel as it can.
  94. The parallelism is limited by the \fIgroup\fR of each device (see below),
  95. and the \fB\-j\fR flag.
  96. If this flag is used then at most \fImaxJobs\fR \fIfscheck\fRs will
  97. be run at a time.
  98. .IP "\fB\-fscheck \fIfscheckProg\fR" 15
  99. Use this to specify an alternative fscheck program, i.e. when testing
  100. a new fscheck.
  101. .IP "\fB\-c\fR 15
  102. Conditionally check the disks.  If the disks were just checked by \fIfscheck\fR
  103. and we are now rebooting, then we don't have to check again.  If the \fB\-c\fR
  104. flag is present then the disks won't be rechecked. 
  105. .BE
  106.  
  107. .SH DESCRIPTION
  108. .PP
  109. \fBFsattach\fR is used during system boot to check the disks for 
  110. inconsistencies and
  111. to export prefixes.
  112. The input to \fBfsattach\fR is a mount table, usually in 
  113. \fI/hosts/$HOST/mount\fR.
  114. The location of the mount table is specified by the
  115. \fB\-m\fR option.
  116. \fBFsattach\fR uses the pass information in the mount table to create child
  117. processes that check
  118. the disk partitions using \fBfscheck\fR.
  119. The output from \fBfscheck\fR is appended to a file with the same name as 
  120. the device and the suffix ".fsc".
  121. If \fBfscheck\fR completes normally, 
  122. then the filesystem is mounted and its prefix exported.
  123. .SH MOUNT TABLE 
  124. The mount table contains information on checking the disks and on exporting
  125. prefixes.
  126. Each line in the table consists of a command and its arguments. 
  127. Blank lines and lines that begin with '#' are ignored.
  128. The \fBAttach\fR command is used to check a disk partition and to attach the 
  129. partition to the file system. 
  130. \fBAttach\fR commands have the following format:
  131. .sp
  132. .in 5
  133. \fBAttach\fR \fIprefix\fR \fIdevice\fR \fIgroup\fR \fIscope\fR \fIaccess\fR
  134. .in 0
  135. .LP
  136. \fIPrefix\fR is the prefix under which to mount the partition. 
  137. .LP
  138. The \fIdevice\fR is the
  139. device on which to run fscheck and to attach.
  140. .LP
  141. The \fIgroup\fR parameter is used to determine the parallelism in checking the
  142. disks. \fBFscheck\fR is a very IO constrained application. 
  143. Most of the execution time is spent waiting for the disk. 
  144. If the system has more than one disk the overall run time of \fBfsattach\fR can
  145. be decreased by checking different disks at the same time.
  146. \fIFsattach\fR will run jobs in parallel if possible.
  147. Any partitions that are in the same group  will NOT be checked
  148. in parallel.
  149. A group name is any sequence of characters and is case sensitive.
  150. The group name "root" has special significance.
  151. It is used as the group of the root partition.
  152. This partition is checked before all other partitions, 
  153. and the server may have to reboot if an error is found in this partition.
  154. .LP
  155. The \fIscope\fR can be either local or export. 
  156. Partitions with local scope are attached only for the local machine, 
  157. whereas partitions with export scope are attached and exported under the
  158. given prefix.
  159. The prefix corresponding to the root partition (usually /bootTmp) is
  160. attached during system boot and is not reattached by \fBfsattach\fR.
  161. For this partition the scope parameter does not have any effect.
  162. .LP
  163. The \fIaccess\fR is used to set the access permissions of the prefix. 
  164. If the access is "r" then the prefix is read only. 
  165. If the access is "rw" then the prefix is can be both read and written.
  166. The access parameter has no effect if the partition is the root partition.
  167. .PP
  168. The \fBExport\fR command is used to export a prefix under a different name.
  169. \fBExport\fR commands have the following format:
  170. .sp
  171. .in 5
  172. \fBExport\fR \fIprefix\fR \fIlocalPath\fR 
  173. .in 0
  174. .LP
  175. \fIPrefix\fR is the name of the prefix to be exported.
  176. .LP
  177. \fILocalPath\fR is the name of a path that is to be exported as \fIprefix\fR.
  178. .PP
  179. All other non-comment lines are interpreted as containing arguments to
  180. \fBfscheck\fR.
  181. The format of these lines is:
  182. .sp
  183. .in 5
  184. \fIdeviceName\fR \fI[arguments]\fR
  185. .in 0
  186. .LP
  187. \fIDeviceName\fR is the name of the device for which \fBfscheck\fR is to use the
  188. \fIarguments\fR. A device name of \fBall\fR will cause \fBfscheck\fR to use the 
  189. arguments for all devices. Any number of arguments can follow the device
  190. name, 
  191. as long as they fit on a single line. 
  192. The same device name can appear on any number of lines.
  193. .PP
  194. The following is a sample mount table. The root partition is 
  195. \fI/dev/rsd0a\fR and
  196. it is exported under the prefix \fI/t1\fR. 
  197. \fI/t2\fR is another small partition on
  198. the same disk. 
  199. \fI/b\fR is a large partition on the disk, and \fI/a\fR is a large partition
  200. that is an entire second disk.
  201. .KS
  202. .DS 
  203. #<Command>      <Prefix>        <Device/Path> <Group>   <Scope>       <Access>
  204.  
  205. Attach          /t1            /dev/rsd0a     root     export          rw
  206. Attach          /t2             /dev/rsd0b      A       export          rw
  207. Attach          /b              /dev/rsd0g      A       export          rw
  208. Attach          /a              /dev/rsd1c      B       export          rw
  209.  
  210. Export        /foo        /t2
  211.  
  212. #<Device>       <Arguments to fscheck>
  213.  
  214. all             -readBlock 10
  215. /dev/rsd0b      -outputFile foo
  216. .DE
  217. .KE
  218. .SH RETURN CODES
  219. \fBFsattach\fR returns one of the following codes upon exit.
  220. .IP 0
  221. No error.
  222. .IP 1
  223. An error was found in the root partition. Reboot the system. See \fBfscheck\fR
  224. for details.
  225. .IP 2
  226. A hard error occurred. There was some problem in either \fBfsattach\fR, 
  227. \fBfscheck\fR,
  228. or \fBprefix\fR that prevented \fBfsattach\fR from completing normally.
  229. .IP 3 
  230. \fBFscheck\fR returned a soft error indication. See \fBfscheck\fR for details.
  231. .IP 4
  232. An error was found in the root partition, but the number of consecutive
  233. times that \fBfscheck\fR was run and an error found exceeds the limit.
  234. .KS
  235. .SH FILES
  236. .DS L
  237. .nf
  238. /boot/cmds/fscheck            command to check disks
  239. /hosts/$HOST/*.fsc            output from fscheck
  240. /bootTmp/.fscheck.out            temporary output from fscheck
  241. .DE
  242. .KE
  243. .fi
  244. .SH KEYWORDS
  245. fsattach, fscheck, prefix, mount, disk, partition, crash, attach, boot 
  246.  
  247. @
  248.  
  249.  
  250. 1.4
  251. log
  252. @added -fscheck argument
  253. @
  254. text
  255. @d9 1
  256. a9 1
  257. '\" $Header: /sprite/src/admin/fsattach/RCS/fsattach.man,v 1.3 90/02/14 14:00:01 jhh Exp Locker: brent $ SPRITE (Berkeley)
  258. a40 4
  259. .IP "\fB\-b \fIbootPrefix\fR" 15
  260. Specifies the name of the prefix under which the kernel attaches the
  261. root partition.
  262. The default is "/bootTmp".
  263. d58 4
  264. @
  265.  
  266.  
  267. 1.3
  268. log
  269. @Uses groups instead of passes
  270. @
  271. text
  272. @d9 1
  273. a9 1
  274. '\" $Header: /sprite/src/admin/fsattach/RCS/fsattach.man,v 1.2 89/06/07 22:14:37 jhh Exp Locker: jhh $ SPRITE (Berkeley)
  275. d59 3
  276. @
  277.  
  278.  
  279. 1.2
  280. log
  281. @Spring cleaning - new mount table format, bug fixes
  282. @
  283. text
  284. @d9 1
  285. a9 1
  286. '\" $Header: /sprite/src/admin/fsattach/RCS/fsattach.man,v 1.1 89/04/10 11:13:13 jhh Exp $ SPRITE (Berkeley)
  287. a19 2
  288. .IP "\fB\-c \fIfile\fR" 15
  289. Read configuration information from \fIfile\fR.
  290. d27 1
  291. a27 1
  292. Ignore pass information found in mount table and run \fBfscheck\fR 
  293. d38 21
  294. d66 4
  295. a69 3
  296. The input to \fBfsattach\fR is a mount table, 
  297. usually stored in \fI/local/bootBin/mount\fR.
  298. A different mount table can be specified by the \fB\-m\fR option.
  299. d75 2
  300. a76 4
  301. For those partitions on which \fBfscheck\fR completed normally, 
  302. the \fBprefix\fR
  303. program is used to attach the partitions to the file system and to 
  304. export prefixes.
  305. d87 1
  306. a87 1
  307. \fBAttach\fR \fIprefix\fR \fIdevice\fR \fIpass\fR \fIscope\fR \fIaccess\fR
  308. d95 1
  309. a95 1
  310. The \fIpass\fR parameter is used to determine the parallelism in checking the
  311. d100 8
  312. a107 5
  313. Any partitions that have the same pass number will be checked concurrently.
  314. Pass numbers start at 0 and increase. Pass 0 is restricted to the root
  315. partition. There are no restrictions on the other passes. It is up to the
  316. creator of the mount table to ensure that the pass numbers are allocated 
  317. in a sensible manner.
  318. d113 1
  319. a113 1
  320. The prefix corresponding to the root partition (usually /local) is
  321. d157 1
  322. a157 1
  323. #<Command>      <Prefix>        <Device/Path> <Pass>   <Scope>       <Access>
  324. d159 4
  325. a162 4
  326. Attach          /bootTmp        /dev/rsd0a      0       local           rw
  327. Attach          /t2             /dev/rsd0b      1       export          rw
  328. Attach          /b              /dev/rsd0g      2       export          rw
  329. Attach          /a              /dev/rsd1c      2       export          rw
  330. d164 1
  331. a164 1
  332. Export         /t1              /bootTmp
  333. d168 1
  334. a168 1
  335. all             -heapLimit 1000000
  336. d192 3
  337. a194 6
  338. /local/bootBin/mount            mount table
  339. /local/bootBin/fsattach.config        fsattach configuration file
  340. /local/bootBin/fscheck            command to check disks
  341. /local/bootBin/prefix            command to mount prefixes
  342. /local/*.fsc                output from fscheck
  343. /local/.fscheck.out            temporary output from fscheck
  344. @
  345.  
  346.  
  347. 1.1
  348. log
  349. @First working version
  350. @
  351. text
  352. @d9 1
  353. a9 1
  354. '\" $Header: /sprite/lib/forms/RCS/cmd.man,v 1.1 89/02/23 13:08:24 ouster Exp $ SPRITE (Berkeley)
  355. d112 15
  356. d135 1
  357. a135 2
  358. .DS L
  359. .nf
  360. d138 6
  361. a143 4
  362. Attach        /local            /dev/rsd0a    0    local        rw
  363. Attach        /t2            /dev/rsd0b    1    export        rw
  364. Attach        /b            /dev/rsd0g    2    export        rw
  365. Attach        /a            /dev/rsd1c    2    export        rw
  366. d145 4
  367. a148 1
  368. Export        /t1            /local
  369. a150 36
  370. .fi
  371. .SH CONFIGURATION FILE
  372. .PP
  373. \fBFsattach\fR reads a configuration file during startup. 
  374. The standard file is \fI/local/bootBin/fsattach.config\fR, although this can
  375. be changed using the \fB\-c\fR option. 
  376. The use of a configuration file is optional. It only exists so that
  377. certain internal variables of fsattach can be modified.
  378. Entries in the file consists of a variable name and its new value.
  379. Lines that are blank or start with '#' are ignored.
  380. The following variables are valid.
  381. .IP "\fBmountTableSize \fIsize\fR" 5
  382. Changes the maximum number of entries in the mount table. The default is
  383. 30.
  384. .IP "\fBrootTempOutputFile \fIfile\fR" 5
  385. When \fBfscheck\fR checks the root partition it stores its output in a
  386. preallocated,
  387. temporary file. This output is later copied into the correct place.
  388. See \fBfscheck\fR for more details.
  389. The default  is ".fscheck.out".
  390. .IP "\fBrootTempOutputFileSize \fIsize\fR" 5
  391. Sets the size of the temporary output file to \fIsize\fR bytes. 
  392. If the output from \fBfscheck\fR exceeds this limit then the extra is discarded.
  393. The size of the temporary file must not cause the file to require more
  394. data blocks than the maximum number of direct blocks.
  395. The default is 8192 bytes.
  396. .IP "\fBheapLimit \fIlimit\fR" 5
  397. The size of the heap used by \fBfscheck\fR is constrained to be less than 
  398. \fIlimit\fR.
  399. The default is 1000000. See \fBfscheck\fR for details.
  400. .IP "\fBoutputDir \fIdir\fR" 5
  401. Changes the directory where the output from \fBfscheck\fR is stored. 
  402. The default is \fI/local\fR.
  403. .IP "\fBfscheck \fIcommand\fR" 5
  404. Makes \fIcommand\fR the command that is executed to run \fBfscheck\fR. 
  405. The default is \fI/local/bootBin/fscheck\fR.
  406. @
  407.